import request from '@/utils/request'

export default {
  //添加小节
  addSection(section) {
    return request({
      url: `/admin/courses/addSection`,
      method: 'post',
      data: section
    })
  },
  //修改小节
  updateSection(section) {
    return request({
      url: `/admin/courses/updateSection`,
      method: 'put',
      data: section
    })
  },
  //删除小节
  delSection(id) {
    return request({
      url: `/admin/courses/delSection/${id}`,
      method: 'delete'
    })
  },
  //查询小节通过id
  getSection(id) {
    return request({
      url: `/admin/courses/getSection/${id}`,
      method: 'get'
    })
  },
  //根据id删除视频
  removeAlyVideo(id) {
    return request({
      url: `/admin/courses/removeVideo/${id}`,
      method: 'delete'
    })
  }
}
